package com.example.famhealing.schedule;

import com.example.famhealing.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.TextView;
 
public class SetCondition extends Activity {
 
     SeekBar mSeekBar;
     TextView mVolume;
     
     ImageButton confirmBtn;
     
     int temp;
     public static int value = 5;
     
     @Override
     protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_condition);
          
           mSeekBar = (SeekBar)findViewById(R.id.seekbar);
           mVolume = (TextView)findViewById(R.id.point);
           
           mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
               
                @Override
                public void onStopTrackingTouch(SeekBar seekBar) {
                     // TODO Auto-generated method stub
                    
                }
               
                @Override
                public void onStartTrackingTouch(SeekBar seekBar) {
                     // TODO Auto-generated method stub
                    
                }
               
                @Override
                public void onProgressChanged(SeekBar seekBar, int progress,
                           boolean fromUser) {
                     // TODO Auto-generated method stub
                     mVolume.setText("컨디션 : " + progress);
                     
                     temp = progress;
                }
           });
           
           confirmBtn = (ImageButton)findViewById(R.id.confirmButton);
           confirmBtn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				value = temp;
				finish();
			}
        	   
           });
     }
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
           // Inflate the menu; this adds items to the action bar if it is present.
           getMenuInflater().inflate(R.menu.main, menu);
           return true;
     }
 
}